
package com.fire.eyes.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.fire.eyes.dao.DeviceCategoryMapper;
import com.fire.eyes.model.DeviceCategoryModel;
import com.fire.eyes.service.IDeviceCategoryService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;

import java.util.List;
import java.util.Map;

/**
 * 设备（传感器）分类Service
 *
 * @author Matthew
 * @Date 2019-01-17 20:48
 */
@Service
public class DeviceCategoryServiceImpl extends ServiceImpl<DeviceCategoryMapper, DeviceCategoryModel> implements IDeviceCategoryService{

    private static final Logger LOGGER = LoggerFactory.getLogger(DeviceCategoryServiceImpl.class);

    @Autowired
    private DeviceCategoryMapper deviceCategoryMapper;

    @Override
    public DeviceCategoryModel selectOne(DeviceCategoryModel entity){
        return deviceCategoryMapper.selectOne(entity);
    }

    @Override
    public List<DeviceCategoryModel>selectList(DeviceCategoryModel model){
        return deviceCategoryMapper.selectListByModel(model);
    }

    @Override
    public Page<DeviceCategoryModel> selectPage(int currentPage, int pageSize, Wrapper<DeviceCategoryModel> wrapper){
        return selectPage(new Page<DeviceCategoryModel>(currentPage,pageSize), wrapper);
    }

    @Override
    public Page<Map<String, Object>> selectMapsPage(int currentPage, int pageSize, Wrapper<DeviceCategoryModel> wrapper){
        return selectMapsPage(new Page<DeviceCategoryModel>(currentPage,pageSize), wrapper);
    }

}
